import request from '@/utils/request';

// 用户登录
export function login(data) {
    return request({
        url: '/api/auth/login',
        method: 'post',
        data
    });
}

// 用户注册
export function register(data) {
    return request({
        url: '/api/auth/register',
        method: 'post',
        data
    });
}

// 发送短信验证码
export function sendSmsCode(data) {
    return request({
        url: '/api/auth/send-sms-code',
        method: 'post',
        data
    });
}

// 获取微信登录URL
export function getWechatLoginUrl() {
    return request({
        url: '/api/auth/wechat-login-url',
        method: 'get'
    });
}

// 获取用户信息
export function getUserInfo() {
    return request({
        url: '/api/users/profile',
        method: 'get'
    });
}

// 退出登录
export function logout() {
    return request({
        url: '/api/auth/logout',
        method: 'post'
    });
} 